#include "include/TreeNode.h"
#include "include/StateVariables.h"

// g++ main.cpp .\src\TreeNode.cpp .\include\StateVariables.h .\include\TreeNode.h -o main

int main(){

    TreeNode *now_node;
    RobotInit init; 
    RobotMove move;

    init.setTNext(&move);
    move.setTNext(&init);

    now_node = &init;
    int ans = 0;
    while (true){
        ans = now_node->work();
        if (ans == StateVariables::SUCCESS){
            now_node = now_node->getTnext();
        }
        if (ans == StateVariables::FAILURE){
            now_node = now_node->getFnext();
        }
    }


}